﻿@model Rally_MvvmC.ViewModels.ErrorViewModel

@{
    ViewBag.Title = "Error";
}

<hgroup class="title">
    <h1 class="error">Error.</h1>
    <h2 class="error">An error occurred while processing your request.</h2>
</hgroup>
@if (!(!(Request.Url.Authority.ToLower().Contains("staging") || Request.Url.Authority.ToLower().Contains("test") || Request.Url.Authority.ToLower().Contains("localhost"))))
{
    <div id="errCopyWrapper">
        <p>
            An error occurred while processing your request. <a href="~/Diagnostics/Exceptions">Exception Log</a>
        </p>
        @{
    HandleErrorInfo handellInfo = null;
    var container = ViewData.Model as Rally_MvvmC.ViewModels.ErrorViewModel;
    if (container != null)
    {
        handellInfo = container.HandleErrorInfo;
    }
    if (handellInfo != null)
    {
        <p>
            Controller:
            @handellInfo.ControllerName
        </p>
            <p>
                Action:
                @handellInfo.ActionName
            </p>
            <p>
                Message:
                @handellInfo.Exception.Message
            </p>
            <span style="width:700px; font-size:small">
                Stack Trace:
                @handellInfo.Exception.StackTrace
            </span>
    }
        }
    </div>
}